package cn.jieruoda.eb.user.domain.repository;

import cn.jieruoda.eb.user.domain.entity.UserLevel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;
import java.time.LocalDateTime;

@Repository
public interface UserLevelRepository extends JpaRepository<UserLevel, Integer> {
    List<UserLevel> findByUidAndIsDel(Integer uid, Boolean isDel);
    Optional<UserLevel> findByUidAndStatusAndIsDel(Integer uid, Boolean status, Boolean isDel);
    List<UserLevel> findByUidAndExpiredTimeAfter(Integer uid, LocalDateTime now);
} 